import Vue from 'vue'
import App from './App.vue'
//引入vue-router
import VueRouter from 'vue-router'
//引入路由器
import router from './router/index.js'
// 加载 element 组件库
import ElementUI from 'element-ui'
// 加载 element 组件库的样式
import 'element-ui/lib/theme-chalk/index.css' // 全局样式引入
//引入自己写的全局样式
import '../public/style/index.scss' //全局样式引入
//引入echarts
import * as echarts from 'echarts';
//引入vxe-table
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'
import "@/config" //引入axios配置
//引入前置路由守卫
import '@/router/permission'
// 引入video.js
import Videojs from 'video.js'
// 图标插件
import 'font-awesome/css/font-awesome.min.css'
//视频插件
import 'video.js/dist/video-js.css'
//移动端UI库
import NutUI from '@nutui/nutui';
import '@nutui/nutui/dist/nutui.css';
//vant
import Vant from 'vant';
import 'vant/lib/index.css';
import * as qiniu from "qiniu-js";

import store from "@/store";


NutUI.install(Vue);
Vue.use(Vant);

// require('./mock');//引入mock
//使用VXETable
Vue.use(VXETable)

//使用echarts
Vue.use(echarts)
Vue.prototype.$video = Videojs
Vue.prototype.$vant = Vant
Vue.prototype.$qiniu = qiniu

Vue.prototype.$router = VueRouter
Vue.prototype.$echarts = echarts
Vue.prototype.$vxeTable = VXETable
Vue.prototype.$store = store
//引用插件
Vue.use(VueRouter)
// 全局注册 element 组件库
Vue.use(ElementUI)
//关闭提示
Vue.config.productionTip = false

// 判断是移动端还是PC端
Vue.prototype.$pc = !/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent);
new Vue({
    router,
    store,
    render: h => h(App),
    beforeCreate() {
        //全局事件总线通信
        Vue.prototype.$bus = this
        console.log("当前设备:", this.$pc ? "PC端" : "移动端")
    }
}).$mount('#app')

